package com.ysj.demo.accompanynetwork;

import com.ysj.demo.accompanynetwork.bean.FavouritePost;
import com.ysj.demo.accompanynetwork.bean.PartnerPost;
import com.ysj.demo.accompanynetwork.bean.RestRsp;
import com.ysj.demo.accompanynetwork.service.bean.PostSearchModel;
import com.ysj.demo.accompanynetwork.service.bean.page.Page;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

import java.util.List;

public interface PostService {

    @Headers({"Content-Type: application/json", "Accept:  application/json"})
    @POST("/post/search")
    Call<RestRsp<Page<PartnerPost>>> searchPosts(@Body PostSearchModel searchModel);

    @Headers({"Content-Type: application/json", "Accept:  application/json"})
    @POST("/post/search")
    Call<RestRsp<Page<PartnerPost>>> queryPostByUserId(@Body PostSearchModel postSearchModel);


    @Headers({"Content-Type: application/json", "Accept:  application/json"})
    @POST("/favourite/post/add")
    Call<RestRsp> watch(@Body FavouritePost favouritePost);
}
